package com.example.demo.service;

import com.example.demo.pojo.PageBean;
import com.example.demo.pojo.User;
import com.example.demo.utils.Result;

public interface UserService {

    //修改密码
    Result updatePasword(int reader_id,String oldPassword,String newPassword);

    //  添加用户
    Result saveUser(User user);

    //检测用户名是否存在
    Result checkStunum(String stunum);

    //根据reader_id改变user_state 借阅卡状态
    Result updateUserStateByReaderId(int reader_id,int state);

    //根据reader_id查询信息
    Result selReaderInfoById(int reader_id);

    //修改借阅卡信息
    Result updateReaderInfo(User user);

    //查询所有的读者
    PageBean<User> selAllUser(int currentPage, int pageSize, int user_state);

    //读者查询
    PageBean<User> selAllUserByConditions(int currentPage, int pageSize,User user, int user_state);
}
